+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
+2004-01-26 Federico Mena Quintero <federico@ximian.com>
+
+ Fix #105497; constify uses of GdkColor.
+
+ * gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
+ (gdk_gc_set_rgb_bg_color): Constify.
+ (gdk_gc_set_foreground): Constify.
+
+ * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
+ * gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.
+
+ * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
+ * gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.
+
+ * gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
+ * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.
+
+ * gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
+ (gdk_draw_layout_with_colors): Constify.
+
+ * gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
+ (gdk_pixmap_colormap_create_from_xpm): Constify.
+ (gdk_pixmap_create_from_xpm): Constify.
+ (gdk_pixmap_colormap_create_from_xpm_d): Constify.
+ (gdk_pixmap_create_from_xpm_d): Constify.
+
+ * gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.
+
+ * gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
+ (gtk_clist_set_background): Constify.
+
+ * gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
+ (gtk_color_button_set_color): Constify.
+
+ * gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
+ Constify and add a check for color != NULL.
+ (gtk_color_selection_get_current_color): Add a check for color != NULL.
+ (gtk_color_selection_set_previous_color): Constify and add a check
+ for color != NULL.
+ (gtk_color_selection_get_previous_color): Add a check for color != NULL.
+
+ * gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
+ (gtk_ctree_node_set_background): Constify.
+
+ * gtk/gtktext.c (gtk_text_insert): Constify.
+ (insert_text_property): Constify.
+ (text_properties_equal): Constify.
+ (new_text_property): Constify.
+
+ * gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
+ (gtk_widget_modify_fg): Constify.
+ (gtk_widget_modify_bg): Constify.
+ (gtk_widget_modify_text): Constify.
+ (gtk_widget_modify_base): Constify.
+
2004-01-26 Christian Rose <menthos@menthos.com>
* configure.in: Added "mi" to ALL_LINGUAS.
#endif
GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
+ const GdkColor *fg,
+ const GdkColor *bg,
gint x,
gint y);
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
gint x,
gint y,
PangoLayoutLine *line,
- GdkColor *foreground,
- GdkColor *background);
+ const GdkColor *foreground,
+ const GdkColor *background);
void gdk_draw_layout_with_colors (GdkDrawable *drawable,
GdkGC *gc,
gint x,
gint y,
PangoLayout *layout,
- GdkColor *foreground,
- GdkColor *background);
+ const GdkColor *foreground,
+ const GdkColor *background);
#ifndef GDK_DISABLE_DEPRECATED
#define gdk_draw_pixmap gdk_draw_drawable
}
void
-gdk_gc_set_foreground (GdkGC *gc,
- GdkColor *color)
+gdk_gc_set_foreground (GdkGC *gc,
+ const GdkColor *color)
{
GdkGCValues values;
}
void
-gdk_gc_set_background (GdkGC *gc,
- GdkColor *color)
+gdk_gc_set_background (GdkGC *gc,
+ const GdkColor *color)
{
GdkGCValues values;
* Calling this function for a GC without a colormap is an error.
**/
void
-gdk_gc_set_rgb_fg_color (GdkGC *gc, GdkColor *color)
+gdk_gc_set_rgb_fg_color (GdkGC *gc,
+ const GdkColor *color)
{
GdkColormap *cmap;
GdkColor tmp_color;
* Calling this function for a GC without a colormap is an error.
**/
void
-gdk_gc_set_rgb_bg_color (GdkGC *gc, GdkColor *color)
+gdk_gc_set_rgb_bg_color (GdkGC *gc,
+ const GdkColor *color)
{
GdkColormap *cmap;
GdkColor tmp_color;
GdkGCValues *values,
GdkGCValuesMask values_mask);
void gdk_gc_set_foreground (GdkGC *gc,
- GdkColor *color);
+ const GdkColor *color);
void gdk_gc_set_background (GdkGC *gc,
- GdkColor *color);
+ const GdkColor *color);
#ifndef GDK_DISABLE_DEPRECATED
void gdk_gc_set_font (GdkGC *gc,
GdkFont *font);
GdkGC *src_gc);
-void gdk_gc_set_colormap (GdkGC *gc,
- GdkColormap *colormap);
-GdkColormap *gdk_gc_get_colormap (GdkGC *gc);
-void gdk_gc_set_rgb_fg_color (GdkGC *gc,
- GdkColor *color);
-void gdk_gc_set_rgb_bg_color (GdkGC *gc,
- GdkColor *color);
-GdkScreen * gdk_gc_get_screen (GdkGC *gc);
+void gdk_gc_set_colormap (GdkGC *gc,
+ GdkColormap *colormap);
+GdkColormap *gdk_gc_get_colormap (GdkGC *gc);
+void gdk_gc_set_rgb_fg_color (GdkGC *gc,
+ const GdkColor *color);
+void gdk_gc_set_rgb_bg_color (GdkGC *gc,
+ const GdkColor *color);
+GdkScreen * gdk_gc_get_screen (GdkGC *gc);
#ifndef GDK_DISABLE_DEPRECATED
#define gdk_gc_destroy gdk_gc_unref
gint x,
gint y,
PangoLayoutLine *line,
- GdkColor *foreground,
- GdkColor *background)
+ const GdkColor *foreground,
+ const GdkColor *background)
{
GSList *tmp_list = line->runs;
PangoRectangle overall_rect;
int x,
int y,
PangoLayout *layout,
- GdkColor *foreground,
- GdkColor *background)
+ const GdkColor *foreground,
+ const GdkColor *background)
{
PangoLayoutIter *iter;
((c)->blue >> 8))
static GdkPixmap *
-gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- GdkPixbuf *pixbuf)
+gdk_pixmap_colormap_new_from_pixbuf (GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ GdkPixbuf *pixbuf)
{
GdkPixmap *pixmap;
GdkPixbuf *render_pixbuf;
}
GdkPixmap*
-gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename)
+gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename)
{
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
}
GdkPixmap*
-gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename)
+gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename)
{
return gdk_pixmap_colormap_create_from_xpm (drawable, NULL, mask,
transparent_color, filename);
}
GdkPixmap*
-gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data)
+gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data)
{
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
}
GdkPixmap*
-gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data)
+gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data)
{
return gdk_pixmap_colormap_create_from_xpm_d (drawable, NULL, mask,
transparent_color, data);
const gchar *data,
gint width,
gint height);
-GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg);
-
-GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename);
-GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- const gchar *filename);
-GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data);
-GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
- GdkColormap *colormap,
- GdkBitmap **mask,
- GdkColor *transparent_color,
- gchar **data);
+GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg);
+
+GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename);
+GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ const gchar *filename);
+GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data);
+GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
+ GdkColormap *colormap,
+ GdkBitmap **mask,
+ const GdkColor *transparent_color,
+ gchar **data);
/* Functions to create/lookup pixmaps from their native equivalents
*/
void gdk_window_set_transient_for (GdkWindow *window,
GdkWindow *parent);
void gdk_window_set_background (GdkWindow *window,
- GdkColor *color);
+ const GdkColor *color);
void gdk_window_set_back_pixmap (GdkWindow *window,
GdkPixmap *pixmap,
gboolean parent_relative);
}
GdkCursor*
-gdk_cursor_new_from_pixmap (GdkPixmap *source,
- GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
- gint x,
- gint y)
+gdk_cursor_new_from_pixmap (GdkPixmap *source,
+ GdkPixmap *mask,
+ const GdkColor *fg,
+ const GdkColor *bg,
+ gint x,
+ gint y)
{
GdkCursorPrivateFB *private;
GdkCursor *cursor;
}
GdkPixmap*
-gdk_pixmap_create_from_data (GdkDrawable *window,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg)
+gdk_pixmap_create_from_data (GdkDrawable *window,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg)
{
GdkPixmap *pixmap;
}
void
-gdk_window_set_background (GdkWindow *window,
- GdkColor *color)
+gdk_window_set_background (const GdkWindow *window,
+ const GdkColor *color)
{
GdkWindowObject *private = (GdkWindowObject *)window;
}
GdkCursor*
-gdk_cursor_new_from_pixmap (GdkPixmap *source,
- GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
- gint x,
- gint y)
+gdk_cursor_new_from_pixmap (GdkPixmap *source,
+ GdkPixmap *mask,
+ const GdkColor *fg,
+ const GdkColor *bg,
+ gint x,
+ gint y)
{
GdkCursorPrivate *private;
GdkCursor *cursor;
}
GdkPixmap*
-gdk_pixmap_create_from_data (GdkDrawable *drawable,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg)
+gdk_pixmap_create_from_data (GdkDrawable *drawable,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg)
{
/* Oh wow. I struggled with dozens of lines of code trying to get
* this right using a monochrome Win32 bitmap created from data, and
}
void
-gdk_window_set_background (GdkWindow *window,
- GdkColor *color)
+gdk_window_set_background (GdkWindow *window,
+ const GdkColor *color)
{
GdkWindowObject *private = (GdkWindowObject *)window;
* Return value: a new #GdkCursor.
**/
GdkCursor*
-gdk_cursor_new_from_pixmap (GdkPixmap *source,
- GdkPixmap *mask,
- GdkColor *fg,
- GdkColor *bg,
- gint x,
- gint y)
+gdk_cursor_new_from_pixmap (GdkPixmap *source,
+ GdkPixmap *mask,
+ const GdkColor *fg,
+ const GdkColor *bg,
+ gint x,
+ gint y)
{
GdkCursorPrivate *private;
GdkCursor *cursor;
}
GdkPixmap*
-gdk_pixmap_create_from_data (GdkDrawable *drawable,
- const gchar *data,
- gint width,
- gint height,
- gint depth,
- GdkColor *fg,
- GdkColor *bg)
+gdk_pixmap_create_from_data (GdkDrawable *drawable,
+ const gchar *data,
+ gint width,
+ gint height,
+ gint depth,
+ const GdkColor *fg,
+ const GdkColor *bg)
{
GdkPixmap *pixmap;
GdkDrawableImplX11 *draw_impl;
*
**/
void
-gdk_window_set_background (GdkWindow *window,
- GdkColor *color)
+gdk_window_set_background (GdkWindow *window,
+ const GdkColor *color)
{
GdkWindowObject *private = (GdkWindowObject *)window;
}
void
-gtk_cell_view_set_background_color (GtkCellView *view,
- GdkColor *color)
+gtk_cell_view_set_background_color (GtkCellView *view,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_CELL_VIEW (view));
GtkRequisition *requisition);
void gtk_cell_view_set_background_color (GtkCellView *cell_view,
- GdkColor *color);
+ const GdkColor *color);
G_END_DECLS
}
void
-gtk_clist_set_foreground (GtkCList *clist,
- gint row,
- GdkColor *color)
+gtk_clist_set_foreground (GtkCList *clist,
+ gint row,
+ const GdkColor *color)
{
GtkCListRow *clist_row;
}
void
-gtk_clist_set_background (GtkCList *clist,
- gint row,
- GdkColor *color)
+gtk_clist_set_background (GtkCList *clist,
+ gint row,
+ const GdkColor *color)
{
GtkCListRow *clist_row;
/* sets the foreground color of a row, the color must already
* be allocated
*/
-void gtk_clist_set_foreground (GtkCList *clist,
- gint row,
- GdkColor *color);
+void gtk_clist_set_foreground (GtkCList *clist,
+ gint row,
+ const GdkColor *color);
/* sets the background color of a row, the color must already
* be allocated
*/
-void gtk_clist_set_background (GtkCList *clist,
- gint row,
- GdkColor *color);
+void gtk_clist_set_background (GtkCList *clist,
+ gint row,
+ const GdkColor *color);
/* set / get cell styles */
void gtk_clist_set_cell_style (GtkCList *clist,
* Since: 2.4
*/
GtkWidget *
-gtk_color_button_new_with_color (GdkColor *color)
+gtk_color_button_new_with_color (const GdkColor *color)
{
return g_object_new (GTK_TYPE_COLOR_BUTTON, "color", color, NULL);
}
**/
void
gtk_color_button_set_color (GtkColorButton *color_button,
- GdkColor *color)
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_COLOR_BUTTON (color_button));
GType gtk_color_button_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_color_button_new (void);
-GtkWidget *gtk_color_button_new_with_color (GdkColor *color);
+GtkWidget *gtk_color_button_new_with_color (const GdkColor *color);
void gtk_color_button_set_color (GtkColorButton *color_button,
- GdkColor *color);
+ const GdkColor *color);
void gtk_color_button_set_alpha (GtkColorButton *color_button,
guint16 alpha);
void gtk_color_button_get_color (GtkColorButton *color_button,
**/
void
gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
- GdkColor *color)
+ const GdkColor *color)
{
ColorSelectionPrivate *priv;
gint i;
gboolean previous_changed;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
priv->changing = TRUE;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
color->red = UNSCALE (priv->color[COLORSEL_RED]);
**/
void
gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
- GdkColor *color)
+ const GdkColor *color)
{
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
priv->changing = TRUE;
ColorSelectionPrivate *priv;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
+ g_return_if_fail (color != NULL);
priv = colorsel->private_data;
color->red = UNSCALE (priv->old_color[COLORSEL_RED]);
void gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
- GdkColor *color);
+ const GdkColor *color);
void gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel,
guint16 alpha);
void gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
GdkColor *color);
guint16 gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel);
void gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
- GdkColor *color);
+ const GdkColor *color);
void gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel,
guint16 alpha);
void gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
}
void
-gtk_ctree_node_set_foreground (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color)
+gtk_ctree_node_set_foreground (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_CTREE (ctree));
g_return_if_fail (node != NULL);
}
void
-gtk_ctree_node_set_background (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color)
+gtk_ctree_node_set_background (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_CTREE (ctree));
g_return_if_fail (node != NULL);
GtkStyle * gtk_ctree_node_get_cell_style (GtkCTree *ctree,
GtkCTreeNode *node,
gint column);
-void gtk_ctree_node_set_foreground (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color);
-void gtk_ctree_node_set_background (GtkCTree *ctree,
- GtkCTreeNode *node,
- GdkColor *color);
+void gtk_ctree_node_set_foreground (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color);
+void gtk_ctree_node_set_background (GtkCTree *ctree,
+ GtkCTreeNode *node,
+ const GdkColor *color);
void gtk_ctree_node_set_row_data (GtkCTree *ctree,
GtkCTreeNode *node,
gpointer data);
static void text_font_unref (GtkTextFont *text_font);
static void insert_text_property (GtkText* text, GdkFont* font,
- GdkColor *fore, GdkColor* back, guint len);
+ const GdkColor *fore, const GdkColor* back, guint len);
static TextProperty* new_text_property (GtkText *text, GdkFont* font,
- GdkColor* fore, GdkColor* back, guint length);
+ const GdkColor* fore, const GdkColor* back, guint length);
static void destroy_text_property (TextProperty *prop);
static void init_properties (GtkText *text);
static void realize_property (GtkText *text, TextProperty *prop);
}
void
-gtk_text_insert (GtkText *text,
- GdkFont *font,
- GdkColor *fore,
- GdkColor *back,
- const char *chars,
- gint nchars)
+gtk_text_insert (GtkText *text,
+ GdkFont *font,
+ const GdkColor *fore,
+ const GdkColor *back,
+ const char *chars,
+ gint nchars)
{
GtkOldEditable *old_editable = GTK_OLD_EDITABLE (text);
gboolean frozen = FALSE;
}
static gint
-text_properties_equal (TextProperty* prop, GdkFont* font, GdkColor *fore, GdkColor *back)
+text_properties_equal (TextProperty* prop, GdkFont* font, const GdkColor *fore, const GdkColor *back)
{
if (prop->flags & PROPERTY_FONT)
{
}
static TextProperty*
-new_text_property (GtkText *text, GdkFont *font, GdkColor* fore,
- GdkColor* back, guint length)
+new_text_property (GtkText *text, GdkFont *font, const GdkColor* fore,
+ const GdkColor* back, guint length)
{
TextProperty *prop;
* point. */
static void
insert_text_property (GtkText* text, GdkFont* font,
- GdkColor *fore, GdkColor* back, guint len)
+ const GdkColor *fore, const GdkColor* back, guint len)
{
GtkPropertyMark *mark = &text->point;
TextProperty* forward_prop = MARK_CURRENT_PROPERTY(mark);
guint gtk_text_get_length (GtkText *text);
void gtk_text_freeze (GtkText *text);
void gtk_text_thaw (GtkText *text);
-void gtk_text_insert (GtkText *text,
- GdkFont *font,
- GdkColor *fore,
- GdkColor *back,
- const char *chars,
- gint length);
+void gtk_text_insert (GtkText *text,
+ GdkFont *font,
+ const GdkColor *fore,
+ const GdkColor *back,
+ const char *chars,
+ gint length);
gboolean gtk_text_backward_delete (GtkText *text,
guint nchars);
gboolean gtk_text_forward_delete (GtkText *text,
}
static void
-gtk_widget_modify_color_component (GtkWidget *widget,
- GtkRcFlags component,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_color_component (GtkWidget *widget,
+ GtkRcFlags component,
+ GtkStateType state,
+ const GdkColor *color)
{
GtkRcStyle *rc_style = gtk_widget_get_modifier_style (widget);
* gtk_widget_modify_style().
**/
void
-gtk_widget_modify_fg (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_fg (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
* gtk_widget_modify_style().
**/
void
-gtk_widget_modify_bg (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_bg (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
* gtk_widget_modify_style().
**/
void
-gtk_widget_modify_text (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_text (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
* and #GtkTextView. See also gtk_widget_modify_style().
**/
void
-gtk_widget_modify_base (GtkWidget *widget,
- GtkStateType state,
- GdkColor *color)
+gtk_widget_modify_base (GtkWidget *widget,
+ GtkStateType state,
+ const GdkColor *color)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (state >= GTK_STATE_NORMAL && state <= GTK_STATE_INSENSITIVE);
GtkRcStyle *gtk_widget_get_modifier_style (GtkWidget *widget);
void gtk_widget_modify_fg (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_bg (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_text (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_base (GtkWidget *widget,
GtkStateType state,
- GdkColor *color);
+ const GdkColor *color);
void gtk_widget_modify_font (GtkWidget *widget,
PangoFontDescription *font_desc);